/*************************************************************************************************
 * Class to represent a perfect polygon. The class inherits geometric element. 
 * A perfect polygon is characterized by a fixed number of sides, all of the same length.
 * How its area is calculated, depends on its derived class. 
 *************************************************************************************************/

package geometricElement;

public abstract class PerfectPolygon extends GeometricElement {
	
	// members
	private double length;
	private int sides;
	
	// methods
	/*************************************************************************************************
	 * Function name: public PerfectPolygon(int xCord, int yCord, double length, int sides)
	 * Input: Number of sides and their length
	 * Output: None
	 * Function operation: Constructor- creates a new perfect polygon with given values
	 *************************************************************************************************/
	public PerfectPolygon(int xCord, int yCord, double length, int sides) {
		// set members as given values		
		super(xCord, yCord);
		this.length = length;
		this.sides = sides;
	}
	
	/*************************************************************************************************
	 * Function name: public double getLength()
	 * Input: None
	 * Output: Length of all sides
	 * Function operation: Returns length attribute
	 *************************************************************************************************/
	public double getLength() { return length;}
	
	/*************************************************************************************************
	 * Function name: public int getSides()
	 * Input: None
	 * Output: Number of sides
	 * Function operation: Returns sides attribute
	 *************************************************************************************************/
	public int getSides() { return sides;}	
}
